package com.yuan.demo;

import com.yuan.api.ITestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by 袁恩光 on 2018/3/13.
 */
@Component
public class TimerTest {

    private static final Logger logger = LoggerFactory.getLogger(TimerTest.class);


    @Autowired
    private ITestService fallbackItt;

    @Scheduled(fixedDelay = 10000)
    public void a() {
        String a = fallbackItt.test("this is test");
        logger.info(a);
    }

}
